package com.forum.post.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.forum.post.model.entity.SensitiveWord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 敏感词Mapper接口
 */
@Mapper
public interface SensitiveWordMapper extends BaseMapper<SensitiveWord> {
    
    /**
     * 批量插入敏感词
     * 
     * @param words 敏感词列表
     * @return 插入数量
     */
    int batchInsert(@Param("words") List<SensitiveWord> words);
    
    /**
     * 获取所有启用的敏感词
     * 
     * @return 敏感词列表
     */
    List<SensitiveWord> getAllActiveSensitiveWords();
    
    /**
     * 计算敏感词数量
     * 
     * @return 敏感词数量
     */
    Integer selectCount(Object o);
} 